Passed
Push — master ( b0778e...060fe5 )
by Roy
04:01 queued 02:31
created

show-paths.remote.deno.ts ➔ objectEntries   A

Complexity

Conditions 2

Size

Total Lines 9
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 2
1
/* eslint-env es6, deno */
2
// # spell-checker:ignore Deno
3
4
/* eslint-disable no-console , security/detect-object-injection, security-node/detect-crlf , @typescript-eslint/ban-ts-comment , @typescript-eslint/no-explicit-any */
5
6
// @ts-ignore
7
import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@5b6b93bdb048098b86f9b8f0952180c2bf0532b1/src/mod.deno.ts';
8
// import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@2d5924e692617a575c8a73c9fb611e93085c4339/src/mod.deno.ts';
9
// import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@latest/src/mod.deno.ts';
10
11
// create a local reference to refer to `Deno` (for better linting without need for multiple `// @ts-ignore` directives)
12
// @ts-ignore
13
const deno = Deno;
14
15
console.log({ osPaths });
16
17
Object.keys(osPaths).forEach((key) => {
18
	const value = (osPaths as any)[key]();
19
	console.log({ key, value });
20
});
21
22
deno.env.set('TEMP', 'temp');
23
deno.env.set('TMPDIR', 'tmpdir');
24
deno.env.set('TMP', 'tmp');
25
Object.keys(osPaths).forEach((key) => {
26
	const value = (osPaths as any)[key]();
27
	console.log({ key, value });
28
});
29
30
deno.env.set('TEMP', 'NEW');
31
Object.keys(osPaths).forEach((key) => {
32
	const value = (osPaths as any)[key]();
33
	console.log({ key, value });
34
});
35
36
/* eslint-enable no-console , security/detect-object-injection, security-node/detect-crlf , @typescript-eslint/ban-ts-comment , @typescript-eslint/no-explicit-any */
37